<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <!-- 加载部部样式及META信息 -->
    <title>修改</title>
    <div th:replace="common/meta"></div>
    <script>
        require.config.jsname = "backend/user/index";
        require.config.modulename="admin"
        require.config.controllername="auth.admin"
        require.config.actionname="edit"
        require.config.moduleurl="/admin/add"
    </script>
</head>

<body class="inside-header inside-aside is-dialog">
<div id="main" role="main">
    <div class="tab-content tab-addtabs">
        <div id="content">
            <div class="row">
                <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
                    <div class="content">
                        <form id="edit-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="/sys/user/save">
                            <input type="hidden" class="form-control" id="id" name="id" th:value="${user.id}"/>
                            <div class="form-group">
                                <label for="username" class="control-label col-xs-3 col-sm-2">用户名:</label>
                                <div class="col-xs-12 col-sm-8">
                                    <input type="text" class="form-control" id="username" name="username" th:value="${user.username}" data-rule="required;username" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="username" class="control-label col-xs-3 col-sm-2">昵称:</label>
                                <div class="col-xs-12 col-sm-8">
                                    <input type="text" class="form-control" id="nickname" name="nickname" th:value="${user.nickname}" data-rule="required;nickname" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="c-image" class="control-label col-xs-12 col-sm-2">图片:</label>
                                <div class="col-xs-12 col-sm-8">
                                    <div class="form-inline">
                                        <input id="c-image" data-rule="required" class="form-control" size="50" name="avatar" type="text" th:value="${user.avatar}">
                                        <span><button type="button" id="plupload-image" class="btn btn-danger plupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> 上传</button></span>
                                        <ul class="row list-inline plupload-preview" id="p-image"></ul>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="username" class="control-label col-xs-3 col-sm-2">密码:</label>
                                <div class="col-xs-12 col-sm-8">
                                    <input type="text" class="form-control"  name="realname" th:value="${user.password}" data-rule="required;password" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="username" class="control-label col-xs-3 col-sm-2">手机号码:</label>
                                <div class="col-xs-12 col-sm-8">
                                    <input type="text" class="form-control" name="phone" th:value="${user.phone}" data-rule="required;mobile" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="email" class="control-label col-xs-3 col-sm-2">邮箱:</label>
                                <div class="col-xs-12 col-sm-8">
                                    <input type="email" class="form-control" id="email" name="email" th:value="${user.email}" data-rule="required;email" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="email1" class="control-label col-xs-3 col-sm-2">备注:</label>
                                <div class="col-xs-12 col-sm-8">
                                    <select  id="email1" class="form-control selectpicker"  name="status">
                                        <option value="1" th:selected="${user.status == 1}">正常</option>
                                        <option value="0" th:selected="${user.status == 0}">禁用</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group hidden layer-footer">
                                <label class="control-label col-xs-12 col-sm-2"></label>
                                <div class="col-xs-12 col-sm-8">
                                    <button type="submit" class="btn btn-success btn-embossed disabled">确定</button>
                                    <button type="reset" class="btn btn-default btn-embossed">重置</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div th:replace="common/script"></div>
</body>
</html>